<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="/main-template.xhtml">





	<ui:define name="content">

		<a4j:outputPanel id="create">

			<h1><h:outputText value="#{msg.title_email}" /></h1>

			<div id="createForm"><rich:panel>

				<h:form id="mailForm">
					<h:panelGrid columns="2">

						<h:outputLabel value="#{msg.name_from_email}*" />
						<h:panelGroup>
							<h:inputText value="#{emailBean.fromNameEmail}"
								id="fromNameEmail" required="true"
								requiredMessage="#{msg.error_required}" />
							<rich:message for="fromNameEmail">
								<f:facet name="passedMarker">
									<h:graphicImage value="/images/passed.png" />
								</f:facet>
								<f:facet name="errorMarker">
									<h:graphicImage value="/images/error.png" />
								</f:facet>
							</rich:message>
						</h:panelGroup>

						<h:outputLabel value="#{msg.from_email}*" />
						<h:panelGroup>
							<h:inputText value="#{emailBean.fromEmail}" id="fromEmail"
								required="true" requiredMessage="#{msg.error_required}" />
							<rich:message for="fromEmail">
								<f:facet name="passedMarker">
									<h:graphicImage value="/images/passed.png" />
								</f:facet>
								<f:facet name="errorMarker">
									<h:graphicImage value="/images/error.png" />
								</f:facet>
							</rich:message>
						</h:panelGroup>


						<h:outputLabel value="#{msg.subject_email}*" />
						<h:panelGroup>
							<h:inputText value="#{emailBean.subjectEmail}" id="subjectEmail"
								required="true" requiredMessage="#{msg.error_required}" />
							<rich:message for="subjectEmail">
								<f:facet name="passedMarker">
									<h:graphicImage value="/images/passed.png" />
								</f:facet>
								<f:facet name="errorMarker">
									<h:graphicImage value="/images/error.png" />
								</f:facet>
							</rich:message>
						</h:panelGroup>


						<h:outputLabel value="#{msg.msg_email}*" />
						<h:panelGroup>
							<h:inputTextarea value="#{emailBean.msgEmail}" id="msgEmail"
								required="true" style="width:145px; height:60px;"
								requiredMessage="#{msg.error_required}"/>
							<rich:message for="msgEmail">
								<f:facet name="passedMarker">
									<h:graphicImage value="/images/passed.png" />
								</f:facet>
								<f:facet name="errorMarker">
									<h:graphicImage value="/images/error.png" />
								</f:facet>
							</rich:message>
						</h:panelGroup>




						<a4j:commandButton value="#{msg.bt_send_email}"
							action="#{emailBean.sendEmail}" reRender="mailForm" />
						<a4j:commandButton value="#{msg.clean}"
							action="#{emailBean.clear}" type="reset" immediate="true"/>


					</h:panelGrid>
				</h:form>
			</rich:panel></div>
		</a4j:outputPanel>

	</ui:define>
</ui:composition>



</html>